﻿<%@ Page Title="" Language="C#" MasterPageFile="~/template.Master" AutoEventWireup="true" CodeBehind="ProgrammAdd.aspx.cs" Inherits="SystemDirectory.ProgrammAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>

.tabContents{
	 
	border: 1px solid #ccc;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	margin: 5px;
	min-height: 200px;
	padding:10px;
	padding-top: 15px;
	}
.top {
	border: 0px solid #ccc;
	overflow: hidden;
	padding: 0;
	margin: 0;
	padding-bottom: 2px; 
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
}
.top-left {
	border: 0px solid #ccc;
	font:bold 14px Arial,  Verdana, Helvetica, sans-serif;
	float: left;
	padding: 5px 0;
}
.top-right {
	border: 0px solid #ccc;
	float: right;
	text-align: right;
}
.details1 {
	overflow: hidden;
}
.content-left {
	float: left;
	padding-right: 50px;
}
.content-right {
}
.frm div {
    display: table;
    position: static;
	margin-bottom:15px;
}
.frm div label {
	width: 106px;
	word-wrap: break-word;	
	display: table-cell;
    vertical-align: middle;
    position: static;
}
.frm textarea {
	width: 260px;
	height: 80px;
}
.frm input[type="text"], input[type="password"] {
	width: 260px;
}
.frm input[type="button"] {
	float: right;
}
.frm select {
	width: 270px;
}
</style>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#modalLookup').modal('show');
            $('#ContentPlaceHolder1_contact').attr("readonly", "readonly");

            $('#btnNone').click(function () {
                $('#modalLookup').modal('hide');
            })
            $('#btnClose').click(function () {
                $('#modalLookup').modal('hide');
            })
        });

        function btnModalClick() {
            //        $.ajax({
            //            url: 'ContactList.aspx',
            //            success: function (data) {
            //                alert(data);
            //                $("#modalLookup .modal-body").html(data);
            //            }
            //        });
            //        return;
            $('#modalLookup').modal('show');
        }

        function btnSelect_click() {
            $('#modalLookup').modal('hide');
            $('#ContentPlaceHolder1_contact').val($('#select:checked').val());
        }
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#ContentPlaceHolder1_txtId").hide();
        })
        function fillId() {
            $("#ContentPlaceHolder1_txtId").val($('#select:checked').val());
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="content">
	<div id="mainContainer">
	<div class="box">
		<div id="container-orglst">
			 
            <h4><a href="#">Add Programme</a> </h4>
            </br>
 
			<div id="tabContaier">
				<ul>
					
					<div  style="width:876px; padding: 0;margin-bottom:10px">
                     <a href="ProgrammeList.aspx"> <input type="button" class="btn btn-primary" value="Back" style="margin-right:25px;float:right"/></a>

                        <input type="reset" name="name" title="Deactivate" value="Deactivate" class="btn btn-primary" />
					<asp:Button ID="Save" runat="server" Text="Save" CssClass="btn btn-primary" 
                            Width="78px" onclick="saveService_Click" />
					
				</div>
					
				</ul>
                </br>
                </br>
                

				
				<div id="Details" class="tabContents details1">
				<form>
					<div class="content-left frm">
						<div>
							<label for="first_name">Programme Name<span style="color: red;">*<span></label>
                            <asp:TextBox ID="ProgrammeName" runat="server"></asp:TextBox>
						</div>
						 
						<div>
							<label for="email">Description</label>
                            <asp:TextBox ID="Description" runat="server" TextMode="MultiLine"></asp:TextBox>
						</div>	
					</div>
					
					<div class="content-right frm">
						<div>
							<label for="manager_name" style="width:75px">Contact</label>
                            <asp:TextBox ID="contact" runat="server"></asp:TextBox>
							<asp:LinkButton ID="lbnModal" runat="server" OnClick="lbnModal_Click">Lookup</asp:LinkButton>
 
                       </div>
                       
                            <div>
                                <label for="is_active">
                                    Is Active?</label>&nbsp;
                                <asp:CheckBox ID="is_active" runat="server" />
                            </div>
					</div>
				</form>
				
			</div>
		</div>
	</div>
	</div>

    </div>
     <!-- Modal -->
    <div id="wrap" runat="server">
        <div id="modalLookup" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
            style="width: 60%; margin-left: -30%" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×</button>
                <h3 id="myModalLabel">
                    List Contact</h3>
            </div>
            <div class="modal-body">
                <div class="tabDetails" style="height: 50px">
                    <div class="field">
                        <label for="postcode" style="display: inline-block; margin-left: 5px; margin-right: 15px">
                            First Name :
                        </label>
                        <asp:TextBox ID="txtFirstName" CssClass="searchText" runat="server"></asp:TextBox>
                        <label for="street" style="display: inline-block; margin-left: 30px">
                            Surname :
                        </label>
                        <asp:TextBox ID="txtSurName" CssClass="searchText" runat="server"></asp:TextBox>
                    </div>
                </div>
                </br>
                <div>
                    <!--<input type="button" value="Search Contact" class="btn btn-primary" style="margin-right:10px" />-->
                    <asp:Button ID="btnSearch" runat="server" Text="SearchContact" CssClass="btn btn-primary"
                        OnClick="btnSearch_Click" />
                    <input type="button" id="btnNone" value="None" class="btn btn-primary" style="margin-right: 10px" />
                    <input type="button" value="Clear" class="btn btn-primary" style="margin-right: 10px" />
                    <a href="ContactCreate.aspx">
                        <input type="button" class="btn btn-primary" value="Create" /></a>
                </div>
                </br>
                <div>
                    <asp:CheckBox ID="cbxInactive" Text="Include in-active contact?" CssClass="checkbox inline"
                        runat="server" AutoPostBack="True" OnCheckedChanged="cbxInactive_CheckedChanged" />
                </div>
                <div class="div-table">
                    <asp:Repeater ID="rptContact" runat="server">
                        <HeaderTemplate>
                            <table width="100%" class="table-striped table-bordered">
                                <thead>
                                    <tr style="background: #006dcc">
                                        <th>
                                        </th>
                                        <th>
                                            Contact Name
                                        </th>
                                        <th>
                                            Mobile Phone
                                        </th>
                                        <th>
                                            Email
                                        </th>
                                        <th>
                                            Contact Type
                                        </th>
                                        <th>
                                            Is Active?
                                        </th>
                                        <th>
                                            Note
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <input type="radio" name="select" id="select" value="<%#Eval("ContactId") %>" onselect="testFunction()" />
                                    <input type="hidden" name="id" value="<%#Eval("ContactId") %>" />
                                </td>
                                <td>
                                    <%#Eval("FirstName") %>
                                </td>
                                <td>
                                    <%#Eval("MobilePhone") %>
                                </td>
                                <td>
                                    <%#Eval("Email") %>
                                </td>
                                <td>
                                    <%#Eval("ContactTypeID") %>
                                </td>
                                <td>
                                    <%#Eval("IsActive") %>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </tbody> </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    </br> <span class="pagelinks" style="float: right;">
                        <asp:HyperLink ID="hplBackward" runat="server"><span class="icon icon-backward"></span></asp:HyperLink>
                        Page
                        <asp:Label ID="lblCurrent" runat="server" Text="Label"></asp:Label>
                        of <span class="nops">
                            <asp:Label ID="lblTotal" runat="server" Text="Label"></asp:Label>
                        </span>
                        <asp:HyperLink ID="hplForward" runat="server"><span class="icon icon-forward"></span></asp:HyperLink>
                    </span>
                </div>
                <div class="form-inline">
                    <input type="button" value="Select" class="btn btn-primary" style="margin-top: 40px;
                        margin-right: 10px" onclick="btnSelect_click()" />
                    <asp:LinkButton ID="lbnEdit" runat="server" CssClass="btn btn-primary" OnClientClick="fillId()"
                        OnClick="lbnEdit_Click">Edit</asp:LinkButton>
                    <input type="button" id="btnClose" class="btn btn-primary" value="Close" style="margin-top: 40px;
                        margin-right: 10px" />
                </div>
                <asp:TextBox ID="txtId" runat="server"></asp:TextBox>
            </div>
            <%--            <div class="modal-footer">
                <button class="btn" data-dismiss="modal" aria-hidden="true">
                    Close</button>
                <button class="btn btn-primary">
                    Save changes</button>
            </div>--%>
        </div>
    </div><!--End Modal-->
    </span></span>
</asp:Content>
